import numpy as np
from scipy.sparse import *
from scipy.stats import uniform

array=np.array([[2,0,0,3,0,0],[1,0,1,0,0,2],[0,0,1,2,0,0]])
csr=csr_matrix(array)
print(csr)
csc=csc_matrix(array)
print(csc)
print(csc.todense())

data=uniform.rvs(size=int(1e6),loc=0,scale=2).reshape(1000,1000)
data[data<1]=0
print(data.nbytes/(1024**2))
data_csr=csr_matrix(data)
print(data_csr.data.size/(1024**2))
